package io.easyspring.message.core.events;

import io.easyspring.message.core.support.EasyMessage;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 消息发送成功事件
 *
 * @author summer
 * @version 2.0.0-RELEASE
 * DateTime 2019-06-17 15:38
 */
@Getter
public class MessageSendSuccessEvent<M extends EasyMessage> extends ApplicationEvent {

    private static final long serialVersionUID = 7482176617008949029L;

    /**
     * 消息对象
     */
    private M message;

    /**
     * 消息发送成功事件构造器
     *
     * @param source 事件最初发生的对象本身
     * @param message 消息对象
     * Author summer
     * Version 2.0.0-RELEASE
     * DateTime 2019-06-17 15:40
     */
    public MessageSendSuccessEvent(Object source, M message) {
        super(source);
        this.message = message;
    }
}
